
<div class="readerframe">
	<div class="title"><?php echo $book['title']; ?></div>
	<div class="content"><p><?php echo $content;?></p></div>
	<div class="pager">
<?php 
if($page[1]) {
	echo "<a href='./?a=book.reader&id={$book['book_id']}&page={$page[1]}'>上一页</a>";
} else {
	echo "<span>上一页</span>";
}
if($page[2]==$page[0]) {
	echo "<span>下一页</span>";
} else {
	echo "<a href='./?a=book.reader&id={$book['book_id']}&page={$page[2]}'>下一页</a>";
}
?>
| 跳页:<input type="text" id="page" size="2" value="<?php echo $page[0]; ?>" onkeydown="keydown(event)" />/<?php echo $page[3];?>
	</div>
</div>

<script language="javascript">
function keydown(evt)
{
	if(13 == (evt ? evt.keyCode : window.event.keyCode))
	{
		location.href='./?a=book.reader&id=<?php echo $book['book_id'];?>&page=PG'.replace('PG', document.getElementById('page').value);
	}
}
</script>
